package com.yiren.dbaa.util;

/**
 * Created by WANGRONGXIANG
 * on 2021/10/29
 * Describe
 */
public class DoubleClickUtils {

    private static long lastClickTime = 0;

    public static boolean isFastDoubleClick() {
        long nowTime = System.currentTimeMillis();
        if (nowTime - lastClickTime < 500) {//500ms
            return true;
        }
        lastClickTime = nowTime;
        return false;
    }

    public static boolean isFastClick() {
        long nowTime = System.currentTimeMillis();
        if (nowTime - lastClickTime < 2000) {//2000ms
            return true;
        }
        lastClickTime = nowTime;
        return false;
    }
}
